#pragma once
#include "hashtable.h"	
namespace lht 
{
	template <class K ,class Hash = HashFunc<K>>
	class unorderset
	{
	public:
		struct  SetKeyofT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
		typedef typename Bucket::HashTable<K, K, Hash, SetKeyofT>::iterator iterator;

		iterator begin()
		{
			return _ht.begin();
		}

		iterator end()
		{
			return _ht.end();
		}
		

		pair<iterator, bool> insert(const K& key)
		{
			return _ht.Insert(key);
		}

	private:
		Bucket::HashTable<K, K,Hash,SetKeyofT> _ht;
	};

	void test1()
	{
		unorderset<int> us;
		us.insert(2);
		us.insert(3);
		us.insert(1);
		us.insert(2);
		us.insert(5);
		unorderset<int>::iterator it = us.begin();
		while (it != us.end())
		{
			cout << *it << " ";
			++it;
		}
		cout << endl;


	}
}